<cpanel setvar="headerimg=../images/mailmenu.gif">
<cpanel setvar="dprefix=../">
<cpanel Branding="include(stdheader.html)">
<style type="text/css">
<?cp Branding::spritelist(.spriteicon_img_mini {float:left;margin-right:5px;background: url\{leftparenthesis}"%"\{rightparenthesis};} %,@spriteurl,images::#icon-${img}_mini {background-position\{colon}0 -${cssposition}px;width\{colon}${width}px;height\{colon}${height}px; }:) imgtype=icon,subtype=img,method=scale_60percent,format=png,img=manageaccounts ?>
</style>
<div class="body-content">
<cpanelfeature cgpro_groupware>
<div class="h1Title"><div class="spriteicon_img_mini" id="icon-manageaccounts_mini"></div> <cpanel langprint="MENUMailChange"></div>

<cpanelif !$appname==webmail || $FORM{'email'}@$FORM{'domain'}==$authuser>
<cpanel setvar="auth_ok=1">
</cpanelif>

<cpanelif $appname==webmail && !$FORM{'email'}@$FORM{'domain'}==$authuser>
<div class="error_details"><cptext 'You are not allowed to change the password for the user “[output,class,_1,status]”.',"$FORM{'email'}@$FORM{'domain'}"></div></p>
</cpanelif>


<cpanelif $CPVAR{'auth_ok'}>
	<?cp Email::passwdpop() email=$FORM{'email'},domain=$FORM{'domain'},quota=$FORM{'quota'},password=$FORM{'password'} ?>
</cpanelif>
	
    <cpanelif !$CPERROR{'email'} && $CPVAR{'auth_ok'}>
		<p>
			<cptext 'The email account “[output,class,_1,status]” was successfully [boolean,_2,created,modified,removed].',"$FORM{'email'}@$FORM{'domain'}",0>
		</p>
        </cpanelif>
    <cpanelif $CPERROR{'email'} && $CPVAR{'auth_ok'}>
    	<p class="errors"><cpanel langprint="CPError"> <cpanel langprint="PassError"> 
    	<a href="#" onclick="document.getElementById('details').style.display='block'; return false;"><cpanel langprint="AODShowDetails"></a> </p>
    	
		<div class="details" id="details">
			<cpanel print="$CPERROR{'email'}">
		</div>
		<noscript>
		<div class="details-noscript" id="details">
			<cpanel print="$CPERROR{'email'}">
		</div>
		</noscript>
        </cpanelif>
	

<cpanelif $appname==webmail>
	<div class="return-link"><a href="../index.html">&larr; <cptext "Go Back"></a></div>
</cpanelif>

<cpanelif !$appname==webmail>
	<div class="return-link"><a href="overview_accounts.html">&larr; <cptext "Go Back"></a></div>
</cpanelif>
</cpanelfeature>
</div>
<cpanel Branding="include(stdfooter.html)">
